package com.jzo2o.customer.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.jzo2o.customer.model.domain.WorkerCertification;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 * 服务人员认证信息表 Mapper 接口
 * </p>
 *
 * @author itcast
 * @since 2023-09-06
 */
public interface WorkerCertificationMapper extends BaseMapper<WorkerCertification> {

    /**
     * @param serveProviderId
     * @author XingDong
     */
    @Update("update worker_certification set certification_status = 2, certification_time = now(), update_time = now()" +
            "where id = #{serveProviderId}")
    void setSuccess(Long serveProviderId);

    /**
     * @param serveProviderId
     * @author XingDong
     */
    @Update("update worker_certification set certification_status = 3, certification_time = now(), update_time = now()" +
            "where id = #{serveProviderId}")
    void setFalse(Long serveProviderId);
}
